<?php
namespace model;

use think\Model;

class RolePermission extends Model{

    public function role(){
        return $this->hasOne('Role', 'id', 'uid');
    }

    public function permission(){
        return $this->hasOne('Permission', 'id', 'pid');
    }

}